<template>
  <view class="page-body">
    <u-navbar :is-back="false" title="超市付款方式"
      title-size="30"
      :background="{background:'#2B88FE' }"
      title-color="#fff">
      <view class="head_icon">
        <u-icon @click="$api.handleBackTo"
          name="arrow-left" color="#fff"
          size="36">
        </u-icon>
        <u-icon @click="$api.handleHomeTo"
          name="home" color="#fff" size="36">
        </u-icon>
      </view>
    </u-navbar>

    <CommDetail :cid="cid" :info="info"
      :current="4">

      <view class="clist x-row">
        <u-button style="margin:20rpx" size="mini"
          type="primary" @click="OnClinkT">对账记录
        </u-button>

        <u-button style="margin:20rpx" size="mini"
          type="primary" @click="OnClinkA">修改设置
        </u-button>

      </view>

      <view class="clist x-row">
        <view class="x-col-center cname">
          结算方式：
        </view>
        {{from.fSumType}}

      </view>

      <view class="clist x-row">
        <view class="x-col-center cname">
          结算时间：
        </view> 每月 {{from.fSumTime}}号

      </view>

      <view class="clist x-row">
        <view class="x-col-center cname">
          对账地点：
        </view> {{from.fAddress}}

      </view>

      <view class="clist x-row">
        <view class="x-col-center cname">
          收款账户：
        </view> {{from.fAccount}}

      </view>
      <view class="clist x-row">
        <view class="x-col-center cname">
          开户行：
        </view>{{from.fBank}}

      </view>

      <view class="clist x-row">
        <view class="x-col-center cname">
          联系人：
        </view>{{from.fContacts}}

      </view>
      <view class="clist x-row">
        <view class="x-col-center cname">
          联系电话：
        </view>{{from.fTell}}

      </view>

      <view class="h16">

      </view>
      <view class="infos whiteBg">
        <view class="clist x-row ">
          <view class="x-col-center cname"
            style="width: 300rpx;">
            其他信息
          </view>
        </view>{{from.fInfo}}

      </view>
      <view :style="{height:height}"></view>
    </CommDetail>
  </view>
</template>

<script>
import CommDetail from './commdetail'
export default {
  components: { CommDetail },
  data() {
    return {
      from: {},
      info: {},
      start: false, //开始时间
      clineOnce: true,
      id: 0,
      header: {
        token: uni.getStorageSync('token')
      },
      height: this.but_height(),
      action: this.urlimg + 'api/Upfile/PostImgFile',
      clist: [],
      isAllList: 1,
      page: 1,
      status: 'loading',
      loading: true
    }
  },
  onLoad(e) {
    uni.setNavigationBarTitle({
      title: '超市付款方式设置'
    })
    this.id = Number(e.id)

    this.$axios('api/MrkBasic/GetDetail', 'post', {
      value: e.id
    }).then(res => {
      this.info = res.Value
      this.loading = false
    })

    this.$axios('api/MrkSumSet/GetDetail', 'post', {
      value: e.id
    }).then(res => {
      this.from = res.Value
      this.loading = false
    })
  },
  methods: {
    // user/submit_apply 			新增报销
    OnClinkT() {
      uni.navigateTo({
        url: `/pages/my_customer/MrkSumMonthList?id=${this.id}`
      })
    },

    OnClinkA() {
      uni.navigateTo({
        url: `/pages/my_customer/MrkSumSetAdd?id=${this.id}`
      })
    }
  }
}
</script>

<style lang="scss">
.clist {
  padding: 34rpx 32rpx;
  box-sizing: border-box;
  background-color: #ffffff;
  .cname {
    width: 164rpx;
    font-size: 32rpx;
    font-weight: 500;
    color: #34404a;
  }

  .rmb {
    font-size: 30rpx;
    font-weight: 400;
    color: #34404a;
  }
}
.infos {
  padding: 0 32rpx;
  .clist {
    padding-left: 0;
    padding-right: 0;
  }
  .txt {
    height: 320rpx;
    background: #f8f9fc;
    border-radius: 16rpx;
    border: 2rpx solid rgba(0, 0, 0, 0.09);
    padding: 22rpx 20rpx;
    box-sizing: border-box;
    width: 100%;
  }
}
.h16 {
  height: 16rpx;
  background-color: #f5f7f9;
}
</style>
